package com.nexus.all.vo;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.nexus.bean.convertor.LongJsonDeserializer;
import com.nexus.bean.convertor.LongJsonSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@ApiModel("评论出参")
public class CommentVO {

    @ApiModelProperty(value = "评论id")
    @JsonSerialize(using = LongJsonSerializer.class)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    private Long Id;

    @ApiModelProperty(value = "评论内容")
    private String commentContent;

    @ApiModelProperty(value = "用户id")
    @JsonSerialize(using = LongJsonSerializer.class)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    private Long userId;


    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("用户昵称")
    private String nickName;

    @ApiModelProperty("用户头像url")
    private String avatarUrl;

    @ApiModelProperty("评论数量")
    private Integer commentCount;

    @ApiModelProperty("点赞数量")
    private Integer likeCount;

    @ApiModelProperty("是否已点赞")
    private Boolean isLiked = Boolean.FALSE;

}
